package com.anti_poverty_detection_system.springboot.mapper;

import com.anti_poverty_detection_system.springboot.model.RegionUpper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ZITONG BAI
 * @since 2024-06-22
 */
public interface RegionUpperMapper extends BaseMapper<RegionUpper> {

    List<String> findProvinces();
    List<String> findCitiesByProvince(String province);
    List<String> findCountiesByCity(String city);
    List<String> findTownshipsByCounty(String county);
    List<String> findVillagesByTownShip(String township);

    void insertRegionUpper(@Param("upperRegionName") String upperRegionName,
                           @Param("regionName") String regionName,
                           @Param("regionNumber") String regionNumber);
}
